package org.jeecg.modules.meter.controller;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.entity.meter.MeterGateway;
import org.jeecg.modules.meter.service.IMeterGatewayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

 /**
 * @Description: 网关设备
 * @Author: jeecg-boot
 * @Date:   2020-11-24
 * @Version: V1.0
 */
@Slf4j
@Api(tags="网关设备")
@RestController
@RequestMapping("/b/meter/meterGateWay")
public class MeterGateWayController {
	@Autowired
	private IMeterGatewayService meterGateWayService;
	 /**
	  * param:projectId
	  */
	 @GetMapping("queryGetWayList")
	 public Result<List<MeterGateway>> queryGetWayList(@RequestParam(name = "projectId")String projectId){
		 Result<List<MeterGateway>> result = new Result<>();
		 List<MeterGateway> meterGateways = meterGateWayService.queryGetWayList(projectId);
		 result.setSuccess(true);
		 result.setResult(meterGateways);
		 return result;
	 }
 }
